1. Field of the Invention
Embodiments of the present invention relate generally to displaying video content, and, more specifically, to real-time frame streaming from a remote graphics processing unit.
2. Description of the Related Art
Some computer systems operate according to a “client-server” computing model, whereby a client computing device interacts with a server computing device across a network. The client computing device may transmit commands and/or data to the server computing device for processing. The server computing device processes the received commands/data, and then transmits processed data back to the client computing device. By implementing this computing model, the client computing device offloads processing operations onto the server computing device.
For example, the client computing device could transmit commands to the server computing device that cause the server computing device to decode and render frames of video data associated with a digital video disc (DVD). The server computing device could then transmit a sequence of rendered frames to the client computing device. The client computing device could display these frames to an end-user via a display device. In this fashion, the processing operations associated with playing the DVD are offloaded onto the server computing device, thereby reducing the processing power required by the client computing device to play the DVD.
A conventional client-server computing model is implemented by software and/or hardware that coordinates data communication between the client device and the server device. FIG. 1 illustrates a prior art client-server computer system 100 configured to coordinate client-server data communication.
As shown, FIG. 1 includes a client computing device 102 in data communication with a server computing device 114 via a network 112. The client computing device 102 includes a central processing unit 104, one or more input/output (I/O) devices 106, and a memory 108. The memory 108 includes a client application 110 that, when executed by the CPU 104, communicates with the server computing device 114 via the network 112.
The server computing device 114 is coupled to a display device 132 and includes a graphics processing unit (GPU) 116, a frame buffer 117, a CPU 118, a frame capture engine 120, one or more I/O devices 122, and a memory 124. The memory 124 includes an operating system 126, one or more applications 128, and a GPU driver 130. The CPU 118 may execute the O/S 126 and the applications 128. The applications 128 may include, for example, a DVD player application. The CPU 118 is configured to execute the GPU driver 130 in order to cause the GPU 116 to render frames of graphic data, or “frames,” for display on the display device 132. The frames may be, e.g., frames of a DVD associated with a DVD player application. The GPU 116 renders each new frame to the frame buffer 117. When the display device 132 refreshes, a display driver (not shown) drives a newly-rendered frame from the frame buffer 117 to the display device 132.
The frame capture engine 120 is a hardware unit configured to capture frames rendered by the GPU 116 for transmission to the client computing device 102. When the GPU 116 renders a new frame to the frame buffer, the frame capture engine 120 copies the newly-rendered frame from the frame buffer 117 and transmits that frame to the client computing device 102. Through this technique, the frame capture engine 120 may stream frames of graphic data to the client computing device 102 for display, storage, etc. This technique works well when the GPU 116 can render each new frame to the frame buffer 117 sufficiently in advance of the time when the display device 132 requires the newly rendered frame to be displayed.
However, in certain situations, the GPU 116 requires almost all of the time between refreshes of the display device 132 to render each frame. In these situations, the frame capture engine 120 does not have sufficient time to copy newly-rendered frames before the display device 132 requires those frames. The frame capture engine 120 may thus be unable to capture every frame rendered by the GPU 116, thereby reducing the number of frames that are transmitted to the client computing device 102. Consequently, the frame rate of the frames displayed by the client computing device 102 is reduced.
Another prior art client-server computer system 200 is illustrated in FIG. 2. As shown, client-server computer system 200 includes some of the same components as client-server computer system 100. In addition, client-server computer system 200 also includes a virtual network computing (VNC) application 212 within the memory 124 of the server computing device 114. The VNC application 212 is a third-party application that communicates with the O/S 126 via application programming interfaces (APIs), e.g., OpenGL APIs, that allow the VNC application 212 to request newly-rendered frames from the GPU 116 via the O/S 126. When the VNC application 212 requests a newly-rendered frame, the O/S 126 causes the GPU driver 130 to insert a “copy” command into a command buffer associated with the GPU 116. When the GPU 116 receives the copy command, the GPU 116 copies a newly-rendered frame from the frame buffer 117 to the memory 124. The VNC application 212 may then transmit the frame from the memory 124 to the client computing device 102.
One drawback of inserting the copy command into the command buffer, as described, is that the GPU 116 must execute all of the commands already included in the command buffer before executing the copy command. In situations where the GPU command buffer includes a sequence of commands associated with a sequence of frames, the VNC application 212 must wait for those commands to be executed before a frame can be copied to the memory 124. Consequently, frames streamed by the VNC application 212 to the client computing device 102 may be delayed as a result of pre-existing commands in the command buffer. When those frames are associated with an interactive application, such as, e.g., a video game or a virtual desktop application, interaction with that application may be difficult or impossible.
As the foregoing illustrates, what is needed in the art is an improved technique for streaming frames of video content to a client computing device.